﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net;

namespace Waegis.Client.Components
{
    /// <summary>
    /// Represents a post item for Waegis API
    /// </summary>
    public class Post
    {
        #region Fields

        Uri _permalink;
        PostType _postType;
        string _authorName;
        Uri _authorUrl;
        string _authorEmail;
        string _title;
        string _body;
        Uri _referrer;
        string _userAgent;
        IPAddress _userIP;

        #endregion

        #region Properties

        /// <summary>
        /// The permalink of the post
        /// </summary>
        public Uri Permalink
        {
            get { return this._permalink; }
            set { this._permalink = value; }
        }

        /// <summary>
        /// The content type of the post
        /// </summary>
        public PostType PostType
        {
            get { return this._postType; }
            set { this._postType = value; }
        }

        /// <summary>
        /// Author's name
        /// </summary>
        public string AuthorName
        {
            get { return this._authorName; }
            set { this._authorName = value; }
        }

        /// <summary>
        /// Author's URL
        /// </summary>
        public Uri AuthorUrl
        {
            get { return this._authorUrl; }
            set { this._authorUrl = value; }
        }

        /// <summary>
        /// Author's email
        /// </summary>
        public string AuthorEmail
        {
            get { return this._authorEmail; }
            set { this._authorEmail = value; }
        }

        /// <summary>
        /// The title of the post
        /// </summary>
        public string Title
        {
            get { return this._title; }
            set { this._title = value; }
        }

        /// <summary>
        /// The body of the post
        /// </summary>
        public string Body
        {
            get { return this._body; }
            set { this._body = value; }
        }

        /// <summary>
        /// The HTTP Referrer of the current page
        /// </summary>
        public Uri Referrer
        {
            get { return this._referrer; }
            set { this._referrer = value; }
        }

        /// <summary>
        /// The user agent of the client
        /// </summary>
        public string UserAgent
        {
            get { return this._userAgent; }
            set { this._userAgent = value; }
        }

        /// <summary>
        /// The IP Address of the client
        /// </summary>
        public IPAddress UserIP
        {
            get { return this._userIP; }
            set { this._userIP = value; }
        }

        #endregion

        #region Public Constructors

        /// <summary>
        /// Public constructor
        /// </summary>
        public Post()
        {
        }

        #endregion
    }
}
